package com.blacktea.behavioralpatterns.templatemethodpattern;

import lombok.extern.slf4j.Slf4j;

/**
 * @description: 付款模板类
 * @author: black tea
 * @date: 2023/3/26 21:28
 */
@Slf4j
public abstract class PaymentTemplate {

    public void makePayment() {
        validate();
        processPayment();
        sendNotification();
    }

    public abstract void validate();

    public abstract void processPayment();

    public void sendNotification() {
        log.info("已成功付款。");
    }
}
